package com.feri.fc.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feri.fc.dto.OrderDto;
import com.feri.fc.entity.Order;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 陪诊订单表(Order)表数据库访问层
 *
 * @author Feri
 * @since 2024-09-19 11:06:00
 */
public interface OrderDao extends BaseMapper<Order> {

    @Select("select o.*,h.name hname,r.office from t_order o inner join t_reservation r on o.rid =r.id inner join t_hospital h on r.hid =h.id \n" +
            "where o.status =\"待分配\" and o.type !='全包' and h.city=#{city}")
    List<OrderDto> selectByCity(String city);
}

